//
//  NSObject+Extension.swift
//  LSTools
//
//  Created by zrf on 2021/6/29.
//

import Foundation
public extension NSObject {
    //获取类名字符串
    static func classString() -> String {
        return NSStringFromClass(self.classForCoder())
    }
    func classString() -> String {
        return NSStringFromClass(self.classForCoder)
    }
   
    // MARK:返回className, 不带module名
    var className:String{
        get{
            let name =  type(of: self).description()
            if(name.contains(".")){
                return name.components(separatedBy: ".")[1];
            }else{
                return name;
            }
            
        }
    }
    

  
}
